﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucTinNhan.ascx.cs" Inherits="STT.Admin.UserControls.ucTinNhan" %>


<div id="content-header">
    <div id="breadcrumb">
        <a href="../Default.aspx" class="tip-bottom" data-original-title="Về bảng điều khiển">
            <i class="icon-home"></i>Trang chủ
        </a>
        <a href="../Admin/Default.aspx?" class="current">Quản lý tin nhắn-tin tức</a>
        <a href="../Admin/Default.aspx?" class="current">Quản lý tin nhắn</a>
    </div>
</div>

<div class="widget-box">
    <div class="widget-title">
        <span class="icon"><i class="icon-th"></i></span>
        <h5>Danh sách tin nhắn</h5>

        <div id="search">
            <asp:TextBox ID="txtTimKiem" runat="server" placeholder="Nhập từ tìm kiếm..."></asp:TextBox>
            <button class="tip-left" data-original-title="Tìm kiếm">
                <asp:ImageButton ID="btSearch" runat="server" ImageUrl="~/img/icon-search.png" OnClick="btSearch_Click" />
            </button>
        </div>
    </div>

    <div class="widget-content nopadding">
        <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
            <asp:GridView ID="gvPhongBan" runat="server" CssClass="table table-bordered table-hover"
                AutoGenerateColumns="False" DataKeyNames="MaTN"
                OnRowCommand="gvPhongBan_RowCommand"
                EnableViewState="false">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:CheckBox ID="cbChonTat" runat="server" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbChon" runat="server" />
                        </ItemTemplate>
                        <ItemStyle Width="10px" HorizontalAlign="Center"></ItemStyle>
                    </asp:TemplateField>
                    <asp:BoundField DataField="MaTN" HeaderText="Mã tin nhắn"
                        InsertVisible="False" ReadOnly="True" SortExpression="MaTN"
                        ItemStyle-CssClass="span1">
                        <ItemStyle CssClass="span1"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="TenHocVien" HeaderText="Tên học viên"
                        SortExpression="TenHocVien" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="TinNhan" HeaderText="Tin nhắn"
                        SortExpression="TinNhan" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                
                    <asp:BoundField DataField="NgayGui" HeaderText="Ngày gửi"
                        SortExpression="NgayGui" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="NguoiGui" HeaderText="Người gửi"
                        SortExpression="NguoiGui" ItemStyle-CssClass="span2">
                        <ItemStyle CssClass="span2"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Sửa" ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
                                Text="Sửa" CommandName="ChonSua" CommandArgument="<%#((GridViewRow)Container).RowIndex%>">
                                <img src="../../img/edit.jpg" alt="Alternate Text" />
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Xóa" ShowHeader="False">
                        <ItemTemplate>
                            <%-- Bắt sự kiện nhấn nút xóa --%>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete" OnClientClick="return ConfirmDelete('Có chắc bạn muốn xóa?');">
                                <img src="../../img/delete.jpg" alt="Alternate Text" />
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle CssClass="span1" HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>

            <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">

                <asp:LinkButton ID="lbXoaTat" runat="server" CssClass="btn" OnClientClick="return ConfirmDelete('Có chắc bạn muốn xóa các dòng đã chọn?');"
                    OnClick="lbXoaTat_Click">Xóa chọn</asp:LinkButton>

                <div class="btn-group">
<%--                    <a href="#thongTin" data-toggle="modal">
                        <button class="btn">
                            Thêm mới</button>
                    </a>--%>
                    <button data-toggle="dropdown" class="btn dropdown-toggle">
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="#">Thêm từ file Excel</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                    </ul>
                </div>

                <div class="btn-group">
                    <button class="btn">
                        <asp:LinkButton ID="lbXuatDuLieu" runat="server" OnClick="lbXuatDuLieu_Click">Xuất dữ liệu</asp:LinkButton>
                    </button>
                    <button data-toggle="dropdown" class="btn dropdown-toggle">
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="#">Xuất Excel</a></li>
                        <li><a href="#">Xuất Word</a></li>
                        <li><a href="#">Xuất PDF</a></li>
                    </ul>
                </div>

                <div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers"
                    id="DataTables_Table_0_paginate">
                    <a tabindex="0" class="first ui-corner-tl ui-corner-bl fg-button ui-button ui-state-default ui-state-disabled"
                        id="DataTables_Table_0_first">First</a>
                    <span><a tabindex="0" class="fg-button ui-button ui-state-default ui-state-disabled">
                        1</a><a
                            tabindex="0" class="fg-button ui-button ui-state-default">2</a><a tabindex="0" class="fg-button ui-button ui-state-default">3</a><a
                                tabindex="0" class="fg-button ui-button ui-state-default">4</a><a tabindex="0" class="fg-button ui-button ui-state-default">5</a>

                    </span><a
                        tabindex="0" class="last ui-corner-tr ui-corner-br fg-button ui-button ui-state-default"
                        id="DataTables_Table_0_last">Last</a>
                </div>
            </div>
        </div>
    </div>
</div>

<%--<div id="validationcontrol">
    <div id="thongTin" class="modal hide" aria-hidden="true" style="display: none;">
        <div class="modal-header">
            <button data-dismiss="modal" class="close" type="button">×</button>
            <h3 runat="server" id="txtTieuDe">Thêm phòng ban</h3>
        </div>
        <div class="modal-body">
            <div class="control-group">
                <label class="control-label">Tên phòng ban: </label>
                <div class="controls">
                    <asp:TextBox ID="txtTenBangCap" runat="server" TextMode="SingleLine"></asp:TextBox>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">Địa chỉ: </label>
                <div class="controls">
                    <asp:TextBox ID="txtDiaChi" runat="server" TextMode="SingleLine"></asp:TextBox>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">Trường phòng: </label>
                <div class="controls">
                    <asp:TextBox ID="txtTruongPhong" runat="server" TextMode="SingleLine"></asp:TextBox>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">Số nhân viên: </label>
                <div class="controls">
                    <asp:TextBox ID="txtSoNhanVien" runat="server" TextMode="SingleLine"></asp:TextBox>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">Trạng thái: </label>
                <div class="controls">
                    <asp:DropDownList ID="ddTrangThai" runat="server"></asp:DropDownList>
                </div>
            </div>

        </div>
        <div class="modal-footer">
            <asp:Button ID="btThemMoi" runat="server" CssClass="btn btn-primary" Text="Thêm mới"
                OnClick="btThemMoi_Click" />
            <a data-dismiss="modal" class="btn" href="#">Hủy</a>
        </div>
    </div>
</div>

    <div id="themFileExcel" class="modal hide" aria-hidden="true" style="display: none;">
    <div class="modal-header">
        <button data-dismiss="modal" class="close" type="button">×</button>
        <h3 runat="server" id="H1">Thêm từ file Excel</h3>
    </div>
    <div class="modal-body">
                <asp:FileUpload ID="FileUpload" runat="server" />
    </div>
    <div class="modal-footer">
        <asp:Button ID="btThemExcel" runat="server" CssClass="btn btn-primary" Text="Thêm từ file"
            OnClick="btThemExcel_Click" />
        <a data-dismiss="modal" class="btn" href="#">Hủy</a>
    </div>
</div>

<script>
    if ('<%Response.Write(chonSuaClick.ToString());%>' == 'True')
        $('#btThem').click();
</script>--%>


